<div class="refentry" lang="en" xml:lang="en"><a id="glEnableClientState"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glEnableClientState — enable or disable client-side capability</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glEnableClientState</b>(</code></td><td>GLenum  </td><td><var class="pdparam">cap</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>cap</code></em></span></dt><dd><p>
                    Specifies the capability to enable.
                    Symbolic constants
                    <code class="constant">GL_COLOR_ARRAY</code>,
                    <code class="constant">GL_EDGE_FLAG_ARRAY</code>,
                    <code class="constant">GL_FOG_COORD_ARRAY</code>,
                    <code class="constant">GL_INDEX_ARRAY</code>,
                    <code class="constant">GL_NORMAL_ARRAY</code>,
                    <code class="constant">GL_SECONDARY_COLOR_ARRAY</code>,
                    <code class="constant">GL_TEXTURE_COORD_ARRAY</code>, and
                    <code class="constant">GL_VERTEX_ARRAY</code>
                    are accepted.
                </p></dd></dl></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glDisableClientState</b>(</code></td><td>GLenum  </td><td><var class="pdparam">cap</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters2"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>cap</code></em></span></dt><dd><p>
                    Specifies the capability to disable.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glEnableClientState</code> and <a class="citerefentry" href="glDisableClientState"><span class="citerefentry"><span class="refentrytitle">glDisableClientState</span></span></a>
            enable or disable individual client-side capabilities. By default, all
            client-side capabilities are disabled.
            Both
            <code class="function">glEnableClientState</code> and <a class="citerefentry" href="glDisableClientState"><span class="citerefentry"><span class="refentrytitle">glDisableClientState</span></span></a> take a
            single argument, <em class="parameter"><code>cap</code></em>, which can assume one of the following
            values:
        </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_COLOR_ARRAY</code></span></dt><dd><p>
                        If enabled, the color array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glColorPointer"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_EDGE_FLAG_ARRAY</code></span></dt><dd><p>
                        If enabled, the edge flag array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glEdgeFlagPointer"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_FOG_COORD_ARRAY</code></span></dt><dd><p>
                        If enabled, the fog coordinate array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glFogCoordPointer"><span class="citerefentry"><span class="refentrytitle">glFogCoordPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_INDEX_ARRAY</code></span></dt><dd><p>
                        If enabled, the index array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glIndexPointer"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_NORMAL_ARRAY</code></span></dt><dd><p>
                        If enabled, the normal array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glNormalPointer"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_SECONDARY_COLOR_ARRAY</code></span></dt><dd><p>
                        If enabled, the secondary color array is enabled for writing and used
                        during rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
                        <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>, <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glColorPointer"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COORD_ARRAY</code></span></dt><dd><p>
                        If enabled, the texture coordinate array is enabled for writing and used
                        during rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
                        <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>, <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called. See <a class="citerefentry" href="glTexCoordPointer"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>.
                    </p></dd><dt><span class="term"><code class="constant">GL_VERTEX_ARRAY</code></span></dt><dd><p>
                        If enabled, the vertex array is enabled for writing and used during
                        rendering when <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
                        <a class="citerefentry" href="glDrawRangeElements"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> <a class="citerefentry" href="glMultiDrawArrays"><span class="citerefentry"><span class="refentrytitle">glMultiDrawArrays</span></span></a>, or
                        <a class="citerefentry" href="glMultiDrawElements"><span class="citerefentry"><span class="refentrytitle">glMultiDrawElements</span></span></a> is called.  See <a class="citerefentry" href="glVertexPointer"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a>.
                    </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            <code class="function">glEnableClientState</code> is available only if the GL version is 1.1 or greater.
        </p><p>
            <code class="constant">GL_FOG_COORD_ARRAY</code> and <code class="constant">GL_SECONDARY_COLOR_ARRAY</code> are available only if the GL version is 1.4 or
            greater.
        </p><p>
            For OpenGL versions 1.3 and greater, or when <code class="code">ARB_multitexture</code> is supported, enabling and disabling
            <code class="constant">GL_TEXTURE_COORD_ARRAY</code> affects the active client texture unit.
            The active client texture unit is controlled with
            <a class="citerefentry" href="glClientActiveTexture"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>cap</code></em> is not an accepted value.
        </p><p>
            <code class="function">glEnableClientState</code> is not allowed between the execution of <a class="citerefentry" href="glBegin"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the
            corresponding <a class="citerefentry" href="glEnd"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>, but an error may or may not be generated. If
            no error is generated, the behavior is undefined.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>,
            <a class="citerefentry" href="glClientActiveTexture"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>,
            <a class="citerefentry" href="glColorPointer"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>,
            <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
            <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
            <a class="citerefentry" href="glEdgeFlagPointer"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>,
            <a class="citerefentry" href="glFogCoordPointer"><span class="citerefentry"><span class="refentrytitle">glFogCoordPointer</span></span></a>,
            <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
            <a class="citerefentry" href="glGetPointerv"><span class="citerefentry"><span class="refentrytitle">glGetPointerv</span></span></a>,
            <a class="citerefentry" href="glIndexPointer"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>,
            <a class="citerefentry" href="glInterleavedArrays"><span class="citerefentry"><span class="refentrytitle">glInterleavedArrays</span></span></a>,
            <a class="citerefentry" href="glNormalPointer"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>,
            <a class="citerefentry" href="glSecondaryColorPointer"><span class="citerefentry"><span class="refentrytitle">glSecondaryColorPointer</span></span></a>,
            <a class="citerefentry" href="glTexCoordPointer"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>,
            <a class="citerefentry" href="glVertexPointer"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
